{% extends 'bootstrap-modal-layout.html.twig' %}

{% set modal_class = 'modal-lg' %}

{% set courseId = course.id %}

{% do script([cloud_sdk_url('uploader'), 'libs/perfect-scrollbar.js', 'libs/jquery-validation.js','app/js/course-manage/live-replay/upload/index.js']) %}

{% block title %}
  {% if activity.ext.replayStatus == 'videoGenerated' %}{{ 'course.replay_manage.upload_modal.edit_replay'|trans }}{% else %}{{ 'course.replay_manage.upload_modal.add_replay'|trans }}{% endif %}
{% endblock %}

{% block body %}

  {% set uploadUrl = path('course_manage_task_replay_upload', {courseId:course.id, taskId: task.id}) %}

  <form id="replay-material-form" class="form-horizontal" action="{{ uploadUrl }}" enctype="multipart/form-data"
    method="post">

    <div class="form-group">
      <div class="col-md-10 col-md-offset-1 controls" id="material-file-chooser">

        {% include 'file-chooser/file-choose.html.twig' with {mediaType: 'video',fileType:'video', file: task.media|default(null), hideImportVideo: true } %}

        <input type="hidden" name="fileId">
      </div>
    </div>

    <div class="form-group">
      <div class="col-md-10 col-md-offset-1 controls">
        <button class="btn btn-primary" id="material-upload-btn" type="submit" data-loading-text="{{'form.btn.save.submiting'|trans}}">{{ 'form.field.create'|trans }}</button>
      </div>
    </div>

    <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">

  </form>
{% endblock %}

{% set hide_footer = true %}